import React from 'react';
import { Rate } from 'antd';
import PropTypes from 'prop-types';
import './index.less';

const WeightRate = props => {
  const { disabled = false, value, onChange = () => {} } = props;

  const rateStyle = {
    color: '#FAAF2B',
    fontSize: 15
  };

  return (
    <Rate
      className="weight-rate"
      disabled={disabled}
      value={value}
      style={rateStyle}
      onChange={onChange}
    />
  );
};

WeightRate.propTypes = {
  disabled: PropTypes.bool,
  value: PropTypes.number,
  onChange: PropTypes.func
};

export default WeightRate;
